<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <img :src="src" alt="" style="width: 200px;height: 200px;">
        <button v-for="item,index in list"
        @click="changePic(index)">{{index + 1}}</button>
    </div>

    <script src="https://unpkg.com/vue@next"></script>
    <script>
        Vue.createApp({
            data(){
                return {
                    src:"",
                    list:[
                        "https://develop-help.oss-cn-hangzhou.aliyuncs.com/blogimg/20210725183741.png",
                        "https://develop-help.oss-cn-hangzhou.aliyuncs.com/blogimg/20210725184153.png",
                        "https://develop-help.oss-cn-hangzhou.aliyuncs.com/blogimg/20210725184201.png"
                    ]
                }
            },
            methods:{
                changePic(i){
                    this.src =this.list[i];
                }
            }
        }).mount("#app")
    </script>
</body>
</html>